<%-- 
    Document   : completprofile
    Created on : Oct 9, 2013, 8:35:37 PM
    Author     : yoko
--%>
<%@page import="org.apt.matrimony.beans.ProfessionalBeans"%>
<%@page import="org.apt.matrimony.beans.CasteBeans"%>
<%@page import="org.apt.matrimony.beans.MotherTongueBeans"%>
<%@page import="org.apt.matrimony.beans.ReligionBeans"%>
<%@page import="java.util.List"%>
<%@page import="org.apt.matrimony.beans.CountryBeans"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <link href="css/expiredmsg.css" rel="stylesheet" type="text/css" />
    <link href="css/ui.css" rel="stylesheet" type="ttext/css"/>
    <script type="text/javascript" src="js/ValidateLive.js"></script>
    <script language="JavaScript" type="text/javascript">

        $(document).ready(function(){
            $('.close').click()(function(){
                $('.overlay, .content').fadeOut('slow');
            })
        })
    </script>
    <script language="javascript" type="text/javascript">
        function message(){
            alert("Please Complete Your Profiles in order to gain all Benefits from website");
        }
    </script>
    <body onload="message()">
        <jsp:useBean id="list" scope="session" class="org.apt.matrimony.methods.selects"></jsp:useBean>
            <div id="overlay" class="overlay"></div>
            <div id="modal" class="modal">
                <div id="login" class="content">
                    <div class="roundedBorders login-box">
                        <!-- Title -->
                        <div id="title" class="b2">
                            <h2>Complete Profiles</h2>
                            <!-- TitleActions -->

                            <!-- /TitleActions -->
                        </div>
                        <!-- Title -->

                        <!-- Inner Content -->
                        
                        <div id="innerContent">
                            <form action="doCompleteAccount" method="post" name="frm">
                               
                            <fieldset>
                                <legend>Register Form</legend>
                                <table>
                                    <tr class="hline2">
                                        <td >&nbsp;</td>
                                        <td colspan="3" align="right" ><font color="red">* All fields are mandatory</font> </td>
                                    </tr>
                                    <tr class="hline2">
                                        <td ><div align="left">* Full Name</div></td>
                                        <td colspan="2" ><div align="left">
                                                <input name="txtName" type="text"  value="" class="textbox1"  id="txtName" onkeyup="nospaces(this)" size="40" maxlength="40" style="width:219px;" />
                                            </div></td>
                                        <td><script type="text/javascript">
                                            var f1 = new LiveValidation('txtName');
                                            f1.add(Validate.Presence);
                                            </script></td>
                                    </tr>

                                    <tr class="hline2">
                                        <td ><div align="left">* Date of Birth</div> </td>
                                        <td ><div align="left">
                                                <select  name="dobDay" class="forminput" style="width:57px;"  id="example3">
                                                    <option value="" selected="selected">-Date-</option>
                                                    <% for (int d = 1; d < 32; d++) {%>
                                                    <option value="<%=d%>"><%=d%></option>
                                                    <%}%>
                                                </select>
                                                <select name="dobMonth" class="forminput" style="width:82px;"   id="example2" >
                                                    <option value="" selected="selected" >-Month-</option>
                                                    <% for (int m = 1; m < 13; m++) {%>
                                                    <option value="<%=m%>"><%=m%></option>
                                                    <%}%>
                                                </select>

                                                <script>
                                                    function calculate_age() {
                                                        yy = document.getElementById('example4').value.substr(2,3);

                                                        mm = document.getElementById('example2').value;

                                                        dd = document.getElementById('example3').value;
                                                        yy = parseInt(yy,10);

                                                        mm = parseInt(mm,10);

                                                        dd = parseInt(dd,10);

                                                        if(isNaN(dd) || isNaN(mm) || isNaN(yy)) { return 0; }

                                                        if((dd < 1 || dd > 31) || (mm < 1 || mm > 12)) { return 0; }
                                                        // change human inputted month to javascript equivalent
                                                        mm = mm - 1;
                                                        // get today's date
                                                        var today = new Date();
                                                        var t_dd = today.getDate();
                                                        var t_mm = today.getMonth();
                                                        var t_yy = today.getFullYear();
                                                        // We are using last two digits, so make a guess of the century
                                                        if(yy == 0) { yy = "00"; }
                                                        else if(yy < 9) { yy = "0"+yy; }
                                                        yy = (today.getFullYear() < "20"+yy ? "19"+yy : "20"+yy);
                                                        // Work out the age!
                                                        var age = t_yy - yy - 1; // Starting point
                                                        if( mm < t_mm ) { age++;} // If it's past their birth month
                                                        if( mm == t_mm && dd <= t_dd) { age++; } // If it's past their birth day
                                                        document.getElementById('age').value=age;
                                                    }
                                                </script>
                                                <select name="dobYear" class="forminput" style="width:76px;" onChange="calculate_age();" id="example4"  >
                                                    <option value="" selected="selected">-Year-</option>
                                                    <% for (int y = 1950; y < 2007; y++) {%>
                                                    <option value="<%=y%>"><%=y%></option>
                                                    <%}%>
                                                </select>
                                                &nbsp;&nbsp;or&nbsp; <input type="text" name="age" value="" id="age" size="3"  /> yrs

                                            </div></td>
                                        <td ></td>
                                    </tr>
                                    <tr class="hline2">
                                        <td   valign="center"><div align="left">* Marital Status</div></td>
                                        <td colspan="2" ><div align="left">
                                                <script>
                                                    function do_hide(){
                                                        var x=document.getElementById("NOOFCHILDREN")
                                                        x.disabled=true;
                                                        document.getElementById('CHILDLIVINGWITHME').disabled = true;
                                                        document.getElementById('NOTLIVINGWITHME').disabled = true;
                                                    }
                                                    function do_hide2(){
                                                        var x=document.getElementById("NOOFCHILDREN")
                                                        x.disabled=false;
                                                    }
                                                    function do_hide3(val) {
                                                        if(val!=0) {
                                                            document.getElementById('CHILDLIVINGWITHME').disabled = false;
                                                            document.getElementById('NOTLIVINGWITHME').disabled = false;
                                                        } else{
                                                            document.getElementById('CHILDLIVINGWITHME').disabled = true;
                                                            document.getElementById('NOTLIVINGWITHME').disabled = true;
                                                        }
                                                    }
                                                </script>
                                                <input name="MARITAL_STATUS" onclick="do_hide()" value="Unmarried" type="radio"  />
                                                Unmarried &nbsp;
                                                <input name="MARITAL_STATUS" onclick="do_hide2()" value="Widower" type="radio"  />
                                                Widow/Widower &nbsp;
                                                <input name="MARITAL_STATUS" onclick="do_hide2()" value="Divorcee" type="radio"   />
                                                Divorcee &nbsp;
                                                <input name="MARITAL_STATUS" onclick="do_hide2()" value="Separated" type="radio"    />
                                                Separated </div></td>
                                    </tr>
                                    <tr class="hline2">
                                        <td   width="210"><div align="left"> &nbsp;&nbsp;No. of Children</div></td>
                                        <td colspan="2"   valign="top"><div align="left">
                                                <select style="width:220px;"  class="forminput" name="NOOFCHILDREN" id="NOOFCHILDREN" onchange="do_hide3(this.value)">
                                                    <option selected="" value="">- Select -</option>
                                                    <% for (int c = 1; c < 5; c++) {
                                                    %>
                                                    <option value="<%=c%>"> <%=c%></option>
                                                    <%}%>
                                                </select>
                                            </div></td>
                                    </tr>
                                    <tr class="hline2">
                                        <td ><div align="left">&nbsp;&nbsp;Children Living Status</div></td>
                                        <td colspan="2" ><div align="left">
                                                <input name="CHILDLIVINGWITHME"  id="CHILDLIVINGWITHME" value="Yes" type="radio" />
                                                Living with me &nbsp;
                                                <input name="CHILDLIVINGWITHME" id="NOTLIVINGWITHME" onfocus="" value="No" type="radio"   />
                                                Not living with me </div></td>
                                    </tr>

                                    <tr class="hline2">
                                        <td ><div align="left">* Height</div></td>
                                        <td colspan="2" ><div align="left">
                                                <input name="txtHeight" type="text"  placeholder="(cm)" class="textbox1"  id="txtHeight" onkeyup="nospaces(this)" size="40" maxlength="40" style="width:219px;" />
                                            </div></td>
                                        <td><script type="text/javascript">
                                            var f13 = new LiveValidation('txtHeight');
                                            f13.add(Validate.Presence);
                                            f13.add(Validate.Numericality('txtHeight', 3))
                                            </script></td>
                                    </tr

                                    <tr class="hline2">
                                        <td ><div align="left">* Religion</div></td>
                                    <script>
                                        function caste_resetRF(val){
                                            alertdo(val);
                                            document.getElementById('Language').selectedIndex = 0;
                                        }
                                    </script>
                                    <td colspan="2" ><div align="left">
                                            <select onchange="caste_resetRF(this.value);" class="selectfield religion" style="width:220px;" size="1" id="religion" name="religion">
                                                <option selected="" value="1">-Select-</option>
                                                <%
                                                    List<ReligionBeans> religionList = list.selectAllReligions();
                                                    for (int i = 0; i < religionList.size(); i++) {
                                                %>
                                                <option value="<%=religionList.get(i).getReligion_Id()%>"><%= religionList.get(i).getReligion_Name()%></option>
                                                <%}%>
                                            </select>
                                        </div></td>
                                    </tr>
                                    <tr class="hline2">
                                        <td ><div align="left">* Mother tongue</div></td>
                                    <script>
                                        function do_request(val) {

                                            religion = $('select.religion option:selected').val();
                                            document.getElementById('caste_rel').innerHTML = "<img src='loading.gif'>";

                                            $.post('generateCaste415a.html?lang='+val+'&rel='+religion,'', function(data) {

                                                document.getElementById('caste_rel').innerHTML = "<img src='loading.gif'>";

                                                if(data!=''){
                                                    document.getElementById('caste_rel').innerHTML = data;
                                                }});
                                            //return true;
                                        }
                                    </script>
                                    <td colspan="2" ><div align="left">
                                            <select onchange="do_request(this.value);" class="selectfield" style="width:220px;" size="1" id="Language" name="Language">

                                                <option selected="" value="vietnamese">Vietnamese</option>
                                                <option value="english">English</option>
                                                <option value="indian">Indian</option>
                                                <option value="korean">Korean</option>
                                                <option value="japanese">Japanese</option>
                                                <option value="french">French</option>
                                                <option value="spanish">Spanish</option>
                                                <option value="1">-other-</option>
                                            </select>
                                        </div></td>
                                    </tr>
                                    <tr class="hline2">
                                        <td  ><div align="left" id="caste">* Professional </div></td>
                                        <td colspan="2" ><div align="left" id="caste_rel">

                                                <select name="professsion" class="forminput" id="professsion" style="width:220px;">
                                                    <option value="1">-Select</option>
                                                    <%
                                                        List<ProfessionalBeans> professList = list.selectAllProfessionals();
                                                        for (int i = 0; i < professList.size(); i++) {
                                                    %>
                                                    <option value="<%=professList.get(i).getProfessional_Id()%>"><%=professList.get(i).getProfessional_Name()%></option>
                                                    <%}%>
                                                </select>
                                            </div></td>
                                    </tr>
                                    <tr class="hline2">
                                        <td  ><div align="left" id="caste">* Caste </div></td>
                                        <td colspan="2" ><div align="left" id="caste_rel">

                                                <select name="caste" class="forminput" id="caste" style="width:220px;">
                                                    <option value="1">-Select</option>
                                                    <%
                                                        List<CasteBeans> casteList = list.selectAllCaste();
                                                        for (int i = 0; i < casteList.size(); i++) {
                                                    %>
                                                    <option value="<%=casteList.get(i).getCaste_Id()%>"><%=casteList.get(i).getCaste_Name()%></option>
                                                    <%}%>
                                                </select>
                                            </div></td>
                                    </tr>
                                    <!----added by Arunkumar on 28-11-2011-->
                                    <script src="js/dropdowlist.js"></script>
                                    <tr class="hline2">
                                        <td><div align="left">&nbsp;&nbsp;Country</div></td>
                                        <td colspan="2"><div align="left">
                                                <span id="cn">
                                                    <select name="country" class="forminput" id="select_country" style="width:220px;" onChange="showCity(this.value)">
                                                        <option value="1">-Select-</option>
                                                        <%
                                                            List<CountryBeans> countryList = list.selectAllCountries();
                                                            for (int i = 0; i < countryList.size(); i++) {
                                                        %>
                                                        <option value="<%=countryList.get(i).getCountry_Id()%>"><%= countryList.get(i).getCountry_Name()%></option>
                                                        <%}%></select> </span>
                                            </div></td>
                                    </tr>
                                    <tr class="hline2">
                                        <td><div align="left">&nbsp;&nbsp;City</div></td>
                                        <td colspan="2"><div align="left" id="city"> 
                                                <select name="city" class="forminput" id="select_city" style="width:220px;" >
                                                    <option value="-1" ></option>
                                                </select>
                                            </div></td>
                                    </tr>
                                    <tr class="hline2">
                                        <td><div align="left">*&nbsp;Mobile </div></td>
                                        <td colspan="2"><div align="left">
                                                <!--   <input name="txtCC" type="text" size="10" maxlength="10" style="width:40px;" id="txtCC" onkeyup="check_phone('txtCC')"  value=""  size="10" maxlength="10" />-->
                                                <select onchange="" class="selectfield" id="txtCC" name="txtCC" style="width: 83px;" onKeyUp="check_phone('txtMobile')" onClick="showToolTip1(event,'Phone number will be displayed to paid members. If you do not want to display your phone number to everyone, you have the option of hiding.');return true" onblur="hideToolTip1()" >
                                                    <option selected="" value="0">Select</option>
                                                    <option value="98" style="color: rgb(0, 79, 0);">+91</option>
                                                    <option value="222" style="color: rgb(0, 79, 0);">+1</option>
                                                    <option value="220" style="color: rgb(0, 79, 0);">+971</option>
                                                    <option value="221" style="color: rgb(0, 79, 0);">+44</option>
                                                    <option value="13" style="color: rgb(0, 79, 0);">+61</option>
                                                    <option value="189" style="color: rgb(0, 79, 0);">+65</option>
                                                    <option value="39" style="color: rgb(0, 79, 0);">+1</option>
                                                    <option value="173" style="color: rgb(0, 79, 0);">+974</option>
                                                    <option value="114" style="color: rgb(0, 79, 0);">+965</option>
                                                    <option value="161" style="color: rgb(0, 79, 0);">+968</option>
                                                    <option value="17" style="color: rgb(0, 79, 0);">+973</option>
                                                    <option value="185" style="color: rgb(0, 79, 0);">+966</option>
                                                    <option value="129" style="color: rgb(0, 79, 0);">+60</option>
                                                    <option value="80" style="color: rgb(0, 79, 0);">+49</option>
                                                    <option value="153" style="color: rgb(0, 79, 0);">+64</option>
                                                    <option value="73" style="color: rgb(0, 79, 0);">+33</option>
                                                    <option value="102" style="color: rgb(0, 79, 0);">+353</option><option value="203" style="color: rgb(0, 79, 0);">+41</option><option value="193" style="color: rgb(0, 79, 0);">+27</option><option value="195" style="color: rgb(0, 79, 0);">+94</option><option value="99" style="color: rgb(0, 79, 0);">+62</option><option value="149" style="color: rgb(0, 79, 0);">+977</option><option value="162" style="color: rgb(0, 79, 0);">+92</option><option value="18" style="color: rgb(0, 79, 0);">+880</option><option value="1" style="color: rgb(0, 79, 0);">+93</option><option value="no" style="color: rgb(0, 79, 0);">Show more countries</option></select>

                                                <input value=""  name="txtMobile" type="text" class="forminput" id="txtMobile" size="40" maxlength="40" style="width:124px;" onKeyUp="check_phone('txtMobile')" onClick="showToolTip1(event,'This information is required if you wish to receive FREE SMS messages and notifications. It is optional and will not be displayed anywhere. ');return true" onblur="hideToolTip1()"/>
                                            </div></td>
                                    </tr>

                                    <!-- ends here --->
                                    <tr class="hline2">
                                        <td ><div align="left">&nbsp;&nbsp;Profile Created by </div></td>
                                        <td colspan="2" ><div align="left">
                                                <select name="txtPC" class="forminput" id="txtPC" style="width:220px;">
                                                    <option value="Self" >Self</option>
                                                    <option value="Parents"  >Parents</option>
                                                    <option value="Guardians"  >Guardians</option>
                                                    <option value="Friendss" >Friends</option>
                                                    <option value="sibling">Siblings</option>
                                                    <option value="relatives">Relatives</option>
                                                </select>
                                            </div></td>

                                    </tr>
                                    <tr class="hline2">
                                        <td ><div align="left">&nbsp;&nbsp;Reference by </div></td>
                                        <td colspan="2" ><div align="left">
                                                <select name="txtRef" class="forminput" id="txtRef" style="width:220px;">
                                                    <option value="Advertisements" >Advertisements</option>
                                                    <option value="Friends">Friends</option>
                                                    <option value="Searh Engines"  >Searh Engines</option>
                                                    <option value="Others" >Others</option>
                                                </select>
                                            </div></td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">
                                            <div class="clearfix login-submit">
                                                <span class="fright">
                                                    <button class="button" type="reset"><strong>Clear</strong></button>
                                                    <button class="button" type="submit"><strong>Register</strong></button>
                                                </span>
                                            </div>
                                        </td>
                                    </tr>
                                    <input type="text" name ="username" value="<%=request.getParameter("username")%>" />
                                </table>
                            </fieldset>
                        </form>
                    </div>
                    <!-- /Inner Content -->
                    <div class="bBottom"><div></div></div>
                     
                </div>

            </div>

        </div>

    </body>
</html>
